<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	    		xmlns:ui="http://java.sun.com/jsf/facelets"
	  			xmlns:h="http://java.sun.com/jsf/html"
	  			xmlns:f="http://java.sun.com/jsf/core"
                xmlns:sf="http://www.springframework.org/tags/faces"
                xmlns:sec="http://www.springframework.org/security/facelets/tags"
                xmlns:spring="http://www.springframework.org/tags"
				template="/WEB-INF/layouts/template.xhtml">

<ui:define name="main">
<script type="text/javascript">document.getElementById('menuAnnouncements').className="selected";</script>
<div id="main">
	<div id="wrapper" class="yui-b">
		<h3 class="title">${msg.title_announcement_review} ${announcement.title}</h3>
		<div id="mainContent">
			<h:form id="client" >
				<div class="field">
					<div class="label">${msg.date}</div>
					<div class="output">
						<h:outputText value="${announcement.date}">
							<f:convertDateTime timeZone="${timezone}" pattern="dd/MM/yy HH:mm"/>
						</h:outputText>
					</div>
				</div>
				<h:panelGroup rendered="${!(empty announcement.description)}">
					<div class="field">
						<div class="label">${msg.description}</div>
						<div class="output">${announcement.description}</div>
					</div>
				</h:panelGroup>
				<div style="clear: both; height: 5px;" />
				<div>
					<sec:ifAnyGranted roles="ROLE_ADMIN">
						<sf:commandLink id="edit" action="edit"><div class="button">${msg.edit}</div></sf:commandLink>
						<sf:commandLink id="delete" action="delete"><div class="button">${msg.delete}</div></sf:commandLink>
					</sec:ifAnyGranted>
				</div>
			</h:form>
		</div>
	</div>
</div>
<div style="clear: both; height: 5px;" />
<h:form><sf:commandLink id="back" action="back"><div class="button">${msg.back} ${msg.title_announcement}</div></sf:commandLink></h:form>
</ui:define>
</ui:composition>